CREATE TABLE `SRRisk`.`MsgTradeCubeDetailV5` (
`fillNumber` BIGINT NOT NULL DEFAULT 0 COMMENT 'SpiderRock execution number (globally unique over trailing 10 days)',
`tradeDate` DATE NOT NULL DEFAULT '1900-01-01' COMMENT 'trade date',
`runStatus` ENUM('None','Prod','Beta','UAT','SysTest') NOT NULL DEFAULT 'None',
`sysEnvironment` ENUM('None','Neptune','Pluto','V7_Stable','V7_Latest','Saturn','Venus','Mars','SysTest','V7_Current') NOT NULL DEFAULT 'None',
`version` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'record version number; starts at zero and goes up every time an execution record is re-published (eg, bust, +1m marks, +10m marks, etc)',
`clOrdId` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'clOrdId resulting in fill (child order)',
`parentNumber` CHAR(19) NOT NULL DEFAULT '0000-0000-0000-0000' COMMENT 'SpiderRock parent number',
`packageId` BIGINT NOT NULL DEFAULT 0 COMMENT 'groups related order/brokers together (eg. Legger w/MLeg Parent)',
`altOrderId` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'alternate order ID (usually clOrdId from client)',
`srcRoutingCode` TINYTEXT NOT NULL DEFAULT '' COMMENT 'inbound FIX routing code, if any',
`spdrSource` ENUM('None','SpdrTicket','SpdrSingle','SRSE','FIX','HedgeTool','TradeHedge','OpenHedge','AutoHedge','Orphan','RiskManager','OrderManager','ManagedOrder','RFQRespSrvr','Legger','SRSEDrop','FixDrop','TicketDrop','SysTest','RFRResponse','AllocOmni','AllocClient','CertGateway','MLegResponse','LeggerX','DropManager','AutoHedgeSrvr','AuctionStrategySrvr','AllocBlockFace','AllocBlockCust','IceChatGateway','EXS2SRC','MLinkResponse','AutoResponderVD','AutoResponderRC','AutoResponderSN','AutoResponderBX','MLink') NOT NULL DEFAULT 'None' COMMENT 'SpiderRock parent order source code [broker pkey]',
`groupingCode` CHAR(19) NOT NULL DEFAULT '0000-0000-0000-0000' COMMENT 'SpiderRock parent broker number [broker pkey]',
`accnt` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SpiderRock Accnt Code',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SpiderRock ClientFirm Code',
`priAggGroup` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'primary aggregation group',
`secAggGroup` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'secondary aggregation group',
`secKey_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'security key',
`secKey_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'security key',
`secKey_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'security key',
`secKey_yr` SMALLINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'security key',
`secKey_mn` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'security key',
`secKey_dy` TINYINT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'security key',
`secKey_xx` DOUBLE NOT NULL DEFAULT 0 COMMENT 'security key',
`secKey_cp` ENUM('Call','Put','Pair') NOT NULL DEFAULT 'Call' COMMENT 'security key',
`secType` ENUM('None','Stock','Future','Option','MLeg') NOT NULL DEFAULT 'None' COMMENT 'security type [Stock, Future, Option]',
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None' COMMENT 'base ticker',
`ticker_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None' COMMENT 'base ticker',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'base ticker',
`viewGroup1` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'viewGroup1 (user supplied; if any)',
`viewGroup2` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'viewGroup2 (user supplied; if any)',
`viewGroup3` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'viewGroup3 (user supplied; if any)',
`riskClass` VARCHAR(8) NOT NULL DEFAULT '' COMMENT 'user supplied risk class code (from SymbolControl record)',
`symbolType` ENUM('None','Equity','ADR','ETF','CashIndex','MutualFund','ShortETF','Future','Bond','DepReceipts','PreferredSec','PreferenceShare','StructuredProd','StapledSec','TradeableRights','Unit','Warrant','WhenIssued','ForeignIssue') NOT NULL DEFAULT 'None' COMMENT 'symbol type',
`sector` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'user supplied sector code (from SymbolControl record)',
`indNum` INT NOT NULL DEFAULT 0 COMMENT 'ind num (00)',
`subNum` INT NOT NULL DEFAULT 0 COMMENT 'sub num (0000)',
`grpNum` INT NOT NULL DEFAULT 0 COMMENT 'grp num (000000)',
`nbrNum` INT NOT NULL DEFAULT 0 COMMENT 'nbr num (00000000)',
`edays` SMALLINT NOT NULL DEFAULT 0 COMMENT 'days to next earnings [-5, +60]',
`expCode` ENUM('None','W1','W2','M1','M2','M34','M56','M7C','Y1','Y2') NOT NULL DEFAULT 'None' COMMENT 'expiration tenor code',
`skewCode` ENUM('None','DD','DN','AT','UP','DU') NOT NULL DEFAULT 'None' COMMENT 'strike skew code',
`widthCode` ENUM('None','Pv1','Pv2','Pv3','Pv5','Pv10','Pv15','Pv20','Pv25','Wide') NOT NULL DEFAULT 'None' COMMENT 'market width code',
`priceFormat` ENUM('None','N0','N1','N2','N3','N4','N5','N6','N7','F4','F8','Q8','F16','F32','H32','Q32','F64','H64','FullPenny','PartPenny','PartNickle','EQT','V1','V2','V3','V4','V5','V6','V7','V8','V9','V10','V11','V12','V13','V14','V15','A0','A1','A2','A3','A4','A5','A6','A7','E32') NOT NULL DEFAULT 'None' COMMENT 'SpiderRock price display format code',
`uPriceFormat` ENUM('None','N0','N1','N2','N3','N4','N5','N6','N7','F4','F8','Q8','F16','F32','H32','Q32','F64','H64','FullPenny','PartPenny','PartNickle','EQT','V1','V2','V3','V4','V5','V6','V7','V8','V9','V10','V11','V12','V13','V14','V15','A0','A1','A2','A3','A4','A5','A6','A7','E32') NOT NULL DEFAULT 'None' COMMENT 'SpiderRock underlier price display code',
`years` FLOAT NOT NULL DEFAULT 0 COMMENT 'years to expiration',
`underliersPerCn` INT NOT NULL DEFAULT 0 COMMENT 'underliers per contract (futures and options)',
`underlierType` ENUM('None','Equity','Other','FX') NOT NULL DEFAULT 'None' COMMENT 'underlier type (affects $greek calcs)',
`tickValue` FLOAT NOT NULL DEFAULT 0 COMMENT '$NLV value of a single tick change in display premium (pointValue = tickValue / tickSize)',
`pointValue` FLOAT NOT NULL DEFAULT 0 COMMENT '$NLV value of a point',
`pointCurrency` ENUM('None','AUD','BRL','CAD','CHF','CNH','CNY','EUR','GBP','JPY','KRW','MXN','MYR','NOK','NZD','SEK','TRY','USD','USDCents','CZK','ZAR','HUF','USX','GBX') NOT NULL DEFAULT 'None',
`uPrcRatio` FLOAT NOT NULL DEFAULT 0 COMMENT 'UPrcRatio (SymbolRatio) from product definition',
`minTickSize` FLOAT NOT NULL DEFAULT 0,
`routingCode` TINYTEXT NOT NULL DEFAULT '' COMMENT 'SpiderRock market routing code',
`origExecID` VARCHAR(20) NOT NULL DEFAULT '' COMMENT 'original execution ID string (child order)',
`lastExecID` VARCHAR(20) NOT NULL DEFAULT '' COMMENT 'most recent execution ID (same as origExecID unless CANCEL/CORRECTION has been processed)',
`transactDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'transaction date/time as reported by exchange or down stream broker',
`execStatus` ENUM('None','Fill','Bust','Correct','Reject','SysRej') NOT NULL DEFAULT 'None' COMMENT 'SpiderRock execution status (Fill,Bust,Correct,Reject,SysRej)',
`remoteText` VARCHAR(64) NOT NULL DEFAULT '' COMMENT 'text comment from endpoint (if any)',
`orderLimitType` ENUM('None','Market','MarketArrival','Prc','PrcDe','PrcDeX','PrcDeT','PrcDeP','PrcDeXT','PrcDeXP','Vol','VolX','PrcV','PrcVX','NoLimit','RelMid','RelJoin','RelCross','SmrtFast','SmrtNorm','RelTurn','PrcDeEm','VolEm','Aux','UPrcPct','PkgNeutral','RcPrem','SynthLimitMM','SynthLimitBW','SynthLimitWW') NOT NULL DEFAULT 'None' COMMENT 'parent order limit type [Vol, VolX, PrcDe, PrcDeX, etc]',
`orderLimitClass` ENUM('Simple','Surface','Probability','SurfProb') NOT NULL DEFAULT 'Simple' COMMENT 'parent order limit class (makeLimitClass if fill was from making; takeLimitClass if fill was from taking)',
`parentShape` ENUM('None','Single','Cross','MLeg','MLegCross') NOT NULL DEFAULT 'None',
`parentOrderHandling` ENUM('None','ActiveTaker','PostOnly','DMA','MktOnOpn','MktOnCls','Facilitate','Matrix','Legger','Seeker','SeekerLegger','CrossResponse','AuctionResponse','MLegAuctionResp','RFQRequest','AwayAlgo','ExchPing','BlockAuction','BlockResponse','SweepTake','CobMaker','FaceOmni','TestParent') NOT NULL DEFAULT 'None' COMMENT 'base parent order algo [take style algo]',
`parentBalanceHandling` ENUM('None','PostWith','PostTurn','PostImprove','PostLimit','MaxIntern','PostWthF','PostImprvR','PostFlash','PostFlashW','PostPeg','PostFlashI') NOT NULL DEFAULT 'None' COMMENT 'base parent order balance handling [make style algo]',
`parentOrderSize` INT NOT NULL DEFAULT 0 COMMENT 'parent order size',
`method` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'execution method string',
`strategy` VARCHAR(36) NOT NULL DEFAULT '' COMMENT 'client strategy [usually client supplied]',
`userName` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'SpiderRock user name associated with the parent order',
`origin` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'parent order origin string',
`source` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'execution source string',
`server` VARCHAR(20) NOT NULL DEFAULT '' COMMENT 'SpiderRock execution engine that handled the parent order',
`clearingFirm` VARCHAR(8) NOT NULL DEFAULT '' COMMENT 'clearing firm (delivery)',
`clearingAccnt` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'clearing firm account (if any)',
`lastCapacity` ENUM('None','Agency','Principal','Individual','Proprietary','AgentOtherMember','RisklessPrincipal') NOT NULL DEFAULT 'None' COMMENT 'child order capacity',
`execRole` ENUM('None','DirectAccnt','AwayGiveup','RiskDrop','AwayDrop','PullDrop') NOT NULL DEFAULT 'None' COMMENT 'SpiderRock relationship to this execution record (Direct, Drop, etc)',
`execBrkrCode` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR exec broker acronym',
`execBrkrAccnt` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'account at executing broker/prime (if any)',
`execBrkrClFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'client/firm at executing broker/prime (if any)',
`execBrkrUserName` VARCHAR(16) NOT NULL DEFAULT '',
`clearingFlipType` ENUM('None','CMTA','Giveup','QSR','NSCC_Flip','DVP','BrkrAccnt') NOT NULL DEFAULT 'None' COMMENT 'clearingFlip Type (CMTA or Giveup)',
`clearingFlipFirm` VARCHAR(6) NOT NULL DEFAULT '' COMMENT 'clearingFlip Broker/MPID/CMTA',
`clearingFlipAccnt` VARCHAR(10) NOT NULL DEFAULT '' COMMENT 'clearingFlip additional detail (sub-accnt)',
`riskGroupId` CHAR(19) NOT NULL DEFAULT '0000-0000-0000-0000' COMMENT 'riskGroupId (parent order group ID) for this execution report',
`fillBrkrRate` FLOAT NOT NULL DEFAULT 0 COMMENT 'billing brokerage rate (tier 1)',
`fillRoutingRate` FLOAT NOT NULL DEFAULT 0 COMMENT 'billing routing rate (tier 1)',
`billingSecType` ENUM('None','Equity','Future','EqtOption','FutOption') NOT NULL DEFAULT 'None' COMMENT 'SpiderRock billing security type',
`billingCategory` ENUM('None','Alpha','AlphaTop50','TiedMaker','TiedTaker','SOR','DMA','AuctionResponse','Facilitate','AlphaFacilitate','AwayTrade','SymOverride','Extern','NonBillable','Seeker','Legger','Drop','AwayAlgo','IsoSweep','SpdrSweep','GTH','AlphaGTH','BlockAuction','BlockResponse') NOT NULL DEFAULT 'None' COMMENT 'SpiderRock billing category',
`firmType` ENUM('None','Customer','Firm','MarketMaker','ProCustomer','BrokerDealer','AwayMM','FirmJBO','BrkrDlrCust') NOT NULL DEFAULT 'None' COMMENT 'chld order firm type [Customer, ProCust, Firm, MM, etc]',
`side` ENUM('None','Buy','Sell') NOT NULL DEFAULT 'None' COMMENT 'parent/child order side',
`priceType` ENUM('None','Explicit','Offset','Zero') NOT NULL DEFAULT 'None' COMMENT 'order limit price type',
`ssaleFlag` ENUM('None','Long','Short','Exempt','Auto','Open','Close','Cover','NA') NOT NULL DEFAULT 'None' COMMENT 'child order short sale flag',
`spdrSSaleFlag` ENUM('None','Long','Short','Exempt','Auto','Open','Close','Cover','NA') NOT NULL DEFAULT 'None' COMMENT 'parent order short sale flag',
`positionType` ENUM('None','Opening','Closing','Auto') NOT NULL DEFAULT 'None' COMMENT 'child order position type',
`autoHedge` ENUM('None','Static','AutoMid','AutoCrx','AutoTrn','SpdrAuto','Spdr10S','Spdr30S','Spdr90S','Spdr5M','Spdr30M','SpdrDay','SmartFast','SmartNorm','FastCrx','FastDark','SlowDark','AlphaVwap1pct','AlphaVwap2pct','AlphaVwap5pct','AlphaVwap25pct','Custom','AwayAlgo') NOT NULL DEFAULT 'None' COMMENT 'SpiderRock auto-hedge algorithm (if any)',
`orderDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'Date/time of parent order arrival',
`orderUBid` DOUBLE NOT NULL DEFAULT 0 COMMENT 'underlier market bid @ parent order arrival',
`orderUAsk` DOUBLE NOT NULL DEFAULT 0 COMMENT 'underlier market ask @ parent order arrival',
`orderBid` DOUBLE NOT NULL DEFAULT 0 COMMENT 'option market bid @ parent order arrival (options only)',
`orderAsk` DOUBLE NOT NULL DEFAULT 0 COMMENT 'option market ask @ parent order arrival (options only)',
`orderSurfPrc` FLOAT NOT NULL DEFAULT 0 COMMENT 'SpiderRock surface price @ parent order arrival (options only)',
`orderSurfVol` FLOAT NOT NULL DEFAULT 0,
`orderLimitVol` FLOAT NOT NULL DEFAULT 0 COMMENT 'parent order limit volatilty (options only)',
`orderLimitPrc` DOUBLE NOT NULL DEFAULT 0 COMMENT 'parent order limit price @ parent order arrival',
`orderLimitRefUPrc` DOUBLE NOT NULL DEFAULT 0 COMMENT 'limit reference underlier price @ parent order arrival (options only)',
`childShape` ENUM('None','Single','Cross','MLeg','MLegCross') NOT NULL DEFAULT 'None',
`childSize` INT NOT NULL DEFAULT 0 COMMENT 'child order size',
`childPrice` DOUBLE NOT NULL DEFAULT 0 COMMENT 'child order price',
`childExch` VARCHAR(6) NOT NULL DEFAULT '' COMMENT 'child order exchange code (SpiderRock)',
`childExDest` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'child order exchange code (downstream)',
`childDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'child order send date/time',
`childUBid` DOUBLE NOT NULL DEFAULT 0 COMMENT 'underlier market bid @ child order send time',
`childUAsk` DOUBLE NOT NULL DEFAULT 0 COMMENT 'underlier market bid @ child order send time',
`childBid` DOUBLE NOT NULL DEFAULT 0 COMMENT 'option market bid @ child order send time (options only)',
`childAsk` DOUBLE NOT NULL DEFAULT 0 COMMENT 'option market ask @ child order send time (options only)',
`childSurfPrc` FLOAT NOT NULL DEFAULT 0 COMMENT 'SpiderRock surface price @ child order send time (options only)',
`childVol` FLOAT NOT NULL DEFAULT 0 COMMENT 'child order volatilty (options only)',
`childProb` FLOAT NOT NULL DEFAULT 0 COMMENT 'child order probability (T+x)',
`childLimitPrc` DOUBLE NOT NULL DEFAULT 0 COMMENT 'parent order limit price @ child order send time',
`childLimitRefUPrc` DOUBLE NOT NULL DEFAULT 0 COMMENT 'limit reference underlier price @ child order send time (options only)',
`childLimitPnl` FLOAT NOT NULL DEFAULT 0 COMMENT 'child limit improvement pnl (childLimitPrc to fillPrice)',
`childAlgoHandler` ENUM('None','ActiveTaker','ActiveMaker','Auction','Responder','Matrix','Cross','Face','Extern','MLegHandler','AutoHedge','Sprayer','Legger','Restart','Orphan','UDefSpread','RFQRequest','MLegResponder','LeggerX','ExchPing','BrkrReview','AuctionResponder','TakeSweep','TestChild') NOT NULL DEFAULT 'None' COMMENT 'algo that generated the child order responsible for this fill',
`childOrderHandling` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'algo that generated the child order responsible for this fill',
`childCreateReason` ENUM('None','CheckAddExch','DarkCross','DmaExtern','DmaSmart','MakeJoin','MakeNbboImpr','MakePostLimit','MakeSelfImpr','MarketAuction','MatrixImpr','MatrixJoin','MatrixLvlSweep','MatrixMaxSweep','MLegSeeker','OptAuctionResp','OptFaceHandler','RelWaitTrigger','SprdDma','SprdFace','SprdSeeker','TakeBrkr','TakeExch','TakeNbbo','RFQRequest','MLegResponse','BrkrCross','PostFlash','MakeOff','MakeFlashImprv','AwayExtern','MatrixCross','ExchPing','BrkrReview','AuctionResponse','SweepTake','TestChild') NOT NULL DEFAULT 'None' COMMENT 'child order create reason code',
`childCancelReason` ENUM('None','MakeException','MakeMaxRiskSize','MakeLimitError','MakeCxlImpr','MakeLmtPrc','MakeSelfImpr','MakeJoinImprv','MakeReJoin','MakeBhnd','MakeAlone','MakeAloneF','MakeOffMkt','MakeMaxExpose','MakeJoinImpr','ContLmtPrc','ChildCxlAll','ChildFlashCxl','ChildIOCTimeout','ForceRetry','StkCxlAll','FutCxlAll','OptCxlAll','FastCxlUBid','FastCxlUAsk','FastCxlUMin','FastCxlUMax','MktMiss','CxlClear','CxlRplDMA','CxlRplTurn','CxlRplSize','CxlRplPrc','CxlRplMake','CxlRplExch','MLegSeekSwitch','MLegSeekChange','MLegSeekND','MLegSeekLimit','MLegDMA','MLegSprdLimit','ParentRplRej','ParentReject','ParentClose','LeggerSwitch','AccelTake','EnginePreOpen','LegLmtPrcRng','MakeLmtPrcErr','ProgTerminate','TickSzErr','ContBrkrTerm','ContCancelHold','ContLimitErr','ContMaxUPrc','ContMinUPrc','ContMktData','ContMktHalt','ContRiskHold','ContSecType','ContStkData','ContStkState','ContFutData','ContFutState','ContOptData','ContOptState','ContUFutData','ContUFutState','ContUMktData','ContUMktState','LegExposeSize','LegLimitErr','LegMarketPrc','MLegCobLmtPrc','MLegLeggerChange','MLegLeggerSwitch','MLegSprdLmtPrc','SprdMktPrc','ContUMktPrc','ContUMktQte','SGContCxl','SGSysCxl','CxlRplPart','CxlRplAlgo','ContingentCancel','SwitchMOC','CxlRplReview','CxlRplAltR','SurfPrcErr','UserHold','DayClose','PendNewTimeout','ActiveHold') NOT NULL DEFAULT 'None' COMMENT 'child order cancel reason code',
`childMktStance` ENUM('None','ExchMrkt','NbboMrkt','ExchImpr','NbboImpr','ExchJoin','NbboJoin','Away') NOT NULL DEFAULT 'None' COMMENT 'child order was expected to be marketable @ child send time',
`childCxlAttempted` ENUM('None','Yes','No') NOT NULL DEFAULT 'None' COMMENT 'cancel attempt was made on the child order prior to receiving this fill',
`childCxlFillLatency` FLOAT NOT NULL DEFAULT 0 COMMENT 'cancel latency (for fills with a cancel attempt)',
`fillExch` VARCHAR(12) NOT NULL DEFAULT '' COMMENT 'ExDest code from child order execution report (lastMkt)',
`fillPrice` DOUBLE NOT NULL DEFAULT 0 COMMENT 'fill price',
`fillTs` DOUBLE NOT NULL DEFAULT 0 COMMENT 'fill report ts (seconds since startup; 100 nanosec resolution)',
`fillDttm` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'Date/time of fill arrival',
`fillSize` INT NOT NULL DEFAULT 0 COMMENT 'fill quantity',
`effFillSize` INT NOT NULL DEFAULT 0 COMMENT 'fill size x underliers per contract',
`fillVol` FLOAT NOT NULL DEFAULT 0 COMMENT 'fill volatilty (options only)',
`fillProb` FLOAT NOT NULL DEFAULT 0 COMMENT 'fill order probability (T+x)',
`fillLimitPrc` DOUBLE NOT NULL DEFAULT 0 COMMENT 'parent order limit price @ fill arrival time',
`fillLimitRefUPrc` DOUBLE NOT NULL DEFAULT 0 COMMENT 'limit reference underlier price @ fill arrival time (options only)',
`fillLimitPnl` FLOAT NOT NULL DEFAULT 0 COMMENT 'fill limit improvement pnl (fillLimitPrc to fillPrice)',
`fillDe` FLOAT NOT NULL DEFAULT 0 COMMENT 'fill delta',
`fillVe` FLOAT NOT NULL DEFAULT 0 COMMENT 'fill vega',
`fillTh` FLOAT NOT NULL DEFAULT 0 COMMENT 'fill theta',
`fillUPrc` DOUBLE NOT NULL DEFAULT 0 COMMENT 'fill underlier mid-market',
`fillBeta` FLOAT NOT NULL DEFAULT 0 COMMENT 'SpiderRock estimate of beta to SPX',
`fillTv` FLOAT NOT NULL DEFAULT 0 COMMENT 'theo vol (user supplied)',
`fillTp` FLOAT NOT NULL DEFAULT 0 COMMENT 'theo price',
`fillUBid` DOUBLE NOT NULL DEFAULT 0 COMMENT 'underlier market bid @ fill arrival',
`fillUAsk` DOUBLE NOT NULL DEFAULT 0 COMMENT 'underlier market ask @ fill arrival',
`fillBid` DOUBLE NOT NULL DEFAULT 0 COMMENT 'option market bid @ fill arrival',
`fillAsk` DOUBLE NOT NULL DEFAULT 0 COMMENT 'option market ask @ fill arrival',
`fillSurfPrc` FLOAT NOT NULL DEFAULT 0 COMMENT 'SpiderRock surface price @ fill arrival',
`fillPostUMark1M` DOUBLE NOT NULL DEFAULT 0 COMMENT 'underlier mark @ fill arrival + 1M',
`fillPostUMark10M` DOUBLE NOT NULL DEFAULT 0 COMMENT 'underlier mark @ fill arrival + 10M',
`fillPostMark1M` DOUBLE NOT NULL DEFAULT 0 COMMENT 'SpiderRock mid or surface mark @ fill arrival + 1M',
`fillPostMark10M` DOUBLE NOT NULL DEFAULT 0 COMMENT 'SpiderRock mid or surface mark @ fill arrival + 10M',
`marginUDnVDn` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc dn, vol dn',
`marginUDnVUp` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc dn, vol up',
`marginUUpVDn` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc up, vol dn',
`marginUUpVUp` FLOAT NOT NULL DEFAULT 0 COMMENT 'Aggregate RiskSlide: uPrc up, vol up',
`riskCode` ENUM('None','R1','R2','R3','R4','R5','R6','R7','R8') NOT NULL DEFAULT 'None' COMMENT 'SpiderRock Risk Code (if any)',
`exchLiquidityTag` VARCHAR(4) NOT NULL DEFAULT '' COMMENT 'liquidity tag (exchange)',
`spdrLiquidityTag` VARCHAR(2) NOT NULL DEFAULT '' COMMENT 'SpiderRock normalized liquidity tag',
`fillExchDetail` TINYTEXT NOT NULL DEFAULT '' COMMENT 'other fix tags (tag:value#tag:value) [additional detail used for analysis]',
`notionalValue` FLOAT NOT NULL DEFAULT 0 COMMENT 'cn * mult * uPrc',
`marketValue` FLOAT NOT NULL DEFAULT 0 COMMENT 'cn * mult * fillPrice',
`orderMktWidth` FLOAT NOT NULL DEFAULT 0 COMMENT 'market width @ parent order arrival',
`childMktWidth` FLOAT NOT NULL DEFAULT 0 COMMENT 'market width @ child order send time',
`fillMktWidth` FLOAT NOT NULL DEFAULT 0 COMMENT 'market width @ fill arrival',
`parentOrderAge` FLOAT NOT NULL DEFAULT 0 COMMENT 'elaspsed time from parent order entry/update to this fill event',
`parentAgeCode` ENUM('None','Sec1','Sec5','Sec20','Sec60','Min5','Min30','Hour2','LT') NOT NULL DEFAULT 'None' COMMENT 'elaspsed time from parent order entry/update to this fill event [coded]',
`trdDelta` FLOAT NOT NULL DEFAULT 0 COMMENT 'trade delta',
`trdDDelta` FLOAT NOT NULL DEFAULT 0 COMMENT 'trade $delta',
`trdGamma` FLOAT NOT NULL DEFAULT 0 COMMENT 'trade gamma',
`trdVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'trade vega',
`trdWtVega` FLOAT NOT NULL DEFAULT 0 COMMENT 'trade wtVega (vega * vol / sqrt(max(0.1, years * 4)))',
`trdTheta` FLOAT NOT NULL DEFAULT 0 COMMENT 'trade theta',
`trdPrem` FLOAT NOT NULL DEFAULT 0 COMMENT 'trade premium over parity',
`trdBeta` FLOAT NOT NULL DEFAULT 0 COMMENT 'trade beta',
`trdDBeta` FLOAT NOT NULL DEFAULT 0 COMMENT 'trade $beta',
`surfEdge` FLOAT NOT NULL DEFAULT 0 COMMENT 'SR surface edge (user supplied theo vol/prc to SpiderRock surface price)',
`surfEdgeUnit` FLOAT NOT NULL DEFAULT 0 COMMENT 'SR surface edge normalized to $100 underlier',
`theoEdge` FLOAT NOT NULL DEFAULT 0 COMMENT 'theo edge (user supplied theo vol/prc to SpiderRock surface price)',
`theoEdgeUnit` FLOAT NOT NULL DEFAULT 0 COMMENT 'theo edge normalized to $100 underlier',
`exchFee` FLOAT NOT NULL DEFAULT 0 COMMENT 'SpiderRock exchange fee estimate',
`halfWidthPnl` FLOAT NOT NULL DEFAULT 0 COMMENT 'estimated half-width Pnl',
`clArrivePnl` FLOAT NOT NULL DEFAULT 0 COMMENT '-dir * qty * (fillPrice - clArriveMark) # maybe use orderSurfPrc instead',
`arrivePnl` FLOAT NOT NULL DEFAULT 0 COMMENT '-dir * qty * (fillPrice - 0.5 * (orderBid + orderAsk)) # maybe use orderSurfPrc instead',
`arriveDnPnl` FLOAT NOT NULL DEFAULT 0 COMMENT 'arrivePnl - uDriftArrivePnl',
`uDriftArrivePnl` FLOAT NOT NULL DEFAULT 0 COMMENT '-dir * qty * fillDe * (0.5 * (fillUBid + fillUAsk) - 0.5 * (orderUBid + orderUAsk))',
`dayDnPnl` FLOAT NOT NULL DEFAULT 0 COMMENT 'delta neutral Pnl (to EOD)',
`dayM1Pnl` FLOAT NOT NULL DEFAULT 0 COMMENT 'delta neutral Pnl (Fill + 1M)',
`dayM10Pnl` FLOAT NOT NULL DEFAULT 0 COMMENT 'delta neutral Pnl (Fill + 10M)',
`uDriftDayPnl` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier delta drift Pnl (to EOD)',
`uDriftM1Pnl` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier delta drift Pnl (Fill + 1M)',
`uDriftM10Pnl` FLOAT NOT NULL DEFAULT 0 COMMENT 'underlier delta drift Pnl (Fill + 10M)',
`dayPnl` FLOAT NOT NULL DEFAULT 0 COMMENT 'actual Pnl to EOD',
`liveMark` DOUBLE NOT NULL DEFAULT 0 COMMENT 'SpiderRock internal use',
`liveUPrc` DOUBLE NOT NULL DEFAULT 0 COMMENT 'SpiderRock internal use',
`pendMark` DOUBLE NOT NULL DEFAULT 0 COMMENT 'SpiderRock internal use',
`pendUPrc` DOUBLE NOT NULL DEFAULT 0 COMMENT 'SpiderRock internal use',
`trdMarkError` VARCHAR(8) NOT NULL DEFAULT '' COMMENT 'trade mark error code',
`dayMarkError` VARCHAR(8) NOT NULL DEFAULT '' COMMENT 'day mark error code',
`userData1` TINYTEXT NOT NULL DEFAULT '' COMMENT 'client supplied data field; passes through to parent and child executions and reports as well as FIX drops',
`userData2` TINYTEXT NOT NULL DEFAULT '' COMMENT 'client supplied data field; passes through to parent and child executions and reports as well as FIX drops',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'SR system timestamp',
CONSTRAINT nonnegative_parentNumber CHECK(ASCII(parentNumber) < 56),
CONSTRAINT nonnegative_groupingCode CHECK(ASCII(groupingCode) < 56),
CONSTRAINT nonnegative_riskGroupId CHECK(ASCII(riskGroupId) < 56),
PRIMARY KEY USING HASH (`fillNumber`,`tradeDate`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='TradeCubeDetail records are published by CoreRiskServers and are visible in SRSE throughout the day. They are designed to be aggregated and analyzed over time.\nTradeCubeDetail records are published to the SpiderRock Archive Host data pipeline after all markup detail is complete.';